#include "cray.h"
#include <limits>

CRay::CRay(CPoint3f start, CVector3f dir)
{
    this->m_Start = start;
    this->m_Direction = dir;
    this->m_InvDirection.m_fX = 1.0/this->m_Direction.m_fX;
    this->m_InvDirection.m_fY = 1.0/this->m_Direction.m_fY;
    this->m_InvDirection.m_fZ = 1.0/this->m_Direction.m_fZ;
    this->m_tSigns[0] = (this->m_InvDirection.m_fX < 0);
    this->m_tSigns[1] = (this->m_InvDirection.m_fY < 0);
    this->m_tSigns[2] = (this->m_InvDirection.m_fZ < 0);
    this->m_fTmin = 0.0;
    this->m_fTmax = std::numeric_limits<double>::max();
}
